<template>
	<view class="container">
		<view class="steps">
			<u-steps current="1" direction="column">
				<block v-for="(item,index) in lists" :key="index">
					<u-steps-item iconSize="160" :title="item.user.nickName+'访问了您的店铺~！'" :desc="item.create_time">
						<view class="slot-icon" slot="icon">
							<u--image shape="circle" :src="item.user.avatar.file_path" width="60rpx" height="60rpx">
							</u--image>
						</view>
					</u-steps-item>
				</block>
			</u-steps>
		</view>
		<view class="tips">
			由于网络数据的关系,仅展示最近30条信息
		</view>
	</view>
</template>

<script>
	import {
		visit
	} from '@/api/author/opus.js';
	export default {
		data() {
			return {
				lists: []
			};
		},
		onLoad() {
			this.getVisit()
		},
		methods: {
			getVisit() {
				visit({}).then(res => {
					this.lists = res.data.visit
				}).catch(err => {

				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
		.tips{
			text-align: center;
			font-size: 20rpx;
			color: #c8c9cc;
			margin-top: 120rpx;
		}

		.steps {
			width: 90%;
			margin: 0 auto;
		padding: 30rpx;

			.u-steps-item__content {
				margin-left: 24rpx !important;
			}
		}
	}
</style>
